﻿using BCDto.Website.User;
using System.ComponentModel.DataAnnotations;

namespace BCDto.Common.Logon
{
    /// <summary>
    /// 微信授权用户登录
    /// </summary>
    public class WechatUserLogonRequestDto
    {
        /// <summary>
        /// 微信Token
        /// </summary>
        [Display(Name = "微信Token")]
        [Required(ErrorMessage = "{0} 不能为空")]
        public string AccessToken { get; set; }
        /// <summary>
        /// 微信平台唯一标识
        /// </summary>
        [Display(Name = "微信平台唯一标识")]
        [Required(ErrorMessage = "{0} 不能为空")]
        public string UnionId { get; set; }
    }

    /// <summary>
    /// 微信授权绑定员工
    /// </summary>
    public class AdminBindWechatRequestDto : AdminLogonRequestDto
    {
        /// <summary>
        /// 微信Token
        /// </summary>
        [Display(Name = "微信Token")]
        [Required(ErrorMessage = "{0} 不能为空")]
        public string AccessToken { get; set; }
        /// <summary>
        /// 微信平台唯一标识
        /// </summary>
        [Display(Name = "微信平台唯一标识")]
        [Required(ErrorMessage = "{0} 不能为空")]
        public string UnionId { get; set; }
        /// <summary>
        /// 微信平台授权信息
        /// </summary>
        [Display(Name = "微信平台授权信息")]
        [Required(ErrorMessage = "{0} 不能为空")]
        public string AuthInfo { get; set; }
    }
    /// <summary>
    /// 微信授权绑定用户
    /// </summary>
    public class UserBindWechatRequestDto : UserRequestDto
    {
        /// <summary>
        /// 微信Token
        /// </summary>
        [Display(Name = "微信Token")]
        [Required(ErrorMessage = "{0} 不能为空")]
        public string AccessToken { get; set; }
        /// <summary>
        /// 微信平台唯一标识
        /// </summary>
        [Display(Name = "微信平台唯一标识")]
        [Required(ErrorMessage = "{0} 不能为空")]
        public string UnionId { get; set; }
        /// <summary>
        /// 微信平台授权信息
        /// </summary>
        [Display(Name = "微信平台授权信息")]
        [Required(ErrorMessage = "{0} 不能为空")]
        public string AuthInfo { get; set; }
    }

    /// <summary>
    /// 微信授权绑定（已登录账号绑定）
    /// </summary>
    public class LogonBindWechatRequestDto
    {
        /// <summary>
        /// 微信Token
        /// </summary>
        [Display(Name = "微信Token")]
        [Required(ErrorMessage = "{0} 不能为空")]
        public string AccessToken { get; set; }
        /// <summary>
        /// 微信平台唯一标识
        /// </summary>
        [Display(Name = "微信平台唯一标识")]
        [Required(ErrorMessage = "{0} 不能为空")]
        public string UnionId { get; set; }
        /// <summary>
        /// 微信平台授权信息
        /// </summary>
        [Display(Name = "微信平台授权信息")]
        [Required(ErrorMessage = "{0} 不能为空")]
        public string AuthInfo { get; set; }
    }
}
